package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品分类管理对象 product_category1
 *
 * @author ruoyi
 * @date 2025-06-27
 */
public class ProductCategory1 extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品分类图片 */
    @Excel(name = "商品分类图片")
    private String productCategoryImage;

    /** 商品分类名称 */
    @Excel(name = "商品分类名称")
    private String productCategoryName;

    /** 排序 */
    private Integer productCategoryId;

    /** 启用状态 */
    @Excel(name = "启用状态",readConverterExp = "1=已启用,0=未启用")
    private Integer productCategoryStatus;

    public static final int STATUS_ENABLE = 1; // 启用
    public static final int STATUS_DISABLE = 0; // 停用

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    public void setProductCategoryImage(String productCategoryImage)
    {
        this.productCategoryImage = productCategoryImage;
    }

    public String getProductCategoryImage()
    {
        return productCategoryImage;
    }

    public void setProductCategoryName(String productCategoryName)
    {
        this.productCategoryName = productCategoryName;
    }

    public String getProductCategoryName()
    {
        return productCategoryName;
    }

    public void setProductCategoryId(Integer productCategoryId)
    {
        this.productCategoryId = productCategoryId;
    }

    public Integer getProductCategoryId()
    {
        return productCategoryId;
    }

    public void setProductCategoryStatus(Integer productCategoryStatus)
    {
        this.productCategoryStatus = productCategoryStatus;
    }

    public Integer getProductCategoryStatus()
    {
        return productCategoryStatus;
    }

    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt)
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt()
    {
        return updatedAt;
    }

    public boolean isEnabled(){
        return productCategoryStatus != null && productCategoryStatus == 0;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("productCategoryImage", getProductCategoryImage())
                .append("productCategoryName", getProductCategoryName())
                .append("productCategoryId", getProductCategoryId())
                .append("productCategoryStatus", getProductCategoryStatus())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())
                .toString();
    }
}
